import { request } from '@/utils'

export default {
  // 获取公司信息
  getCompanyInfo: (company_id) => request.get(`/company/getCompanyInfo/${company_id}`),
  // 获取申请者的公司信息
  getOwnerCompanyInfo: (owner_id) => request.get(`/company/getOwnerCompanyInfo/${owner_id}`),
  // 是否为企业所有者（提交过注册信息）
  hasOwnerCompany: (owner_id) => request.get(`/company/hasOwnerCompany/${owner_id}`),
  // 注册公司信息
  registerCompany: (data) => request.post('/company/registerCompany',data),
  // 删除公司信息
  deleteCompanyInfo: (company_id) => request.delete(`/company/deleteCompanyInfo/${company_id}`),
  // 更新公司信息
  updateCompanyInfo: (data) => request.put('/company/updateCompanyInfo',data),
  // 获取公司选项列表
  getCompanySelection: () => request.get('/company/getCompanySelection'),
  // 获取公司所有者的公司申请信息
  getCompanyOwnerJoinApplications: (owner_id) => request.get(`/company/getCompanyOwnerJoinApplications/${owner_id}`),
  // 获取申请加入公司者的申请信息
  getCompanyApplicantJoinApplications: (applicant_id) => request.get(`/company/getCompanyApplicantJoinApplications/${applicant_id}`),
  // 申请加入公司
  applyJoinCompany: (data) => request.post('/company/applyJoinCompany',data),
  // 取消加入公司申请
  cancelJoinCompany: (id) => request.put(`/company/cancelJoinCompany/${id}`),
  // 同意加入公司申请
  agreeJoinCompany: (id) => request.put(`/company/agreeJoinCompany/${id}`),
  // 拒绝加入公司申请
  disagreeJoinCompany: (id) => request.put(`/company/disagreelJoinCompany/${id}`),
  // 获取公司人员列表
  getCompanyStaff: (company_id) => request.get(`/company/getCompanyStaff/${company_id}`),
  // 移除公司人员
  removeCompanyStaff: (recruiter_id) => request.put(`/company/removeCompanyStaff/${recruiter_id}`),
  // 更新公司招聘人员头衔
  updateRecruiterTitle: (recruiter_id, title) => request.put(`/company/updateRecruiterTitle?recruiter_id=${recruiter_id}&title=${title}`),
  // 企业是否可正常操作（若被撤销则无法进行其他操作）
  isOperable: (company_id) => request.get(`/company/isOperable/${company_id}`),
}
